<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.blacklist.ban_user}</h3>
    </div>
    <p class="tips">{$Think.lang.blacklist.ban_user_tips}</p>
    <table class="tb tb2 ">
    	<tbody id="add-banned-ip">
        <form name="cpform" method="post" action="__URL__/banUser">
		    <input type="hidden" name="op" value="save" />
		    <input type="hidden" name="type" value="add" />
		    <tr><th class="partition" colspan="2">{$Think.lang.blacklist.add_banned_user}</th></tr>
	        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.username}:</td></tr>
	        <tr>
	            <td class="vtop rowform"><input name="username" value="" type="text" class="txt"  /></td>
	            <td class="vtop tips2"></td>
	        </tr>
	         <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.email}:</td></tr>
	        <tr>
	            <td class="vtop rowform"><input name="email" value="" type="text" class="txt"  /></td>
	            <td class="vtop tips2"></td>
	        </tr>
	        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.blacklist.user_banned_type}:</td></tr>
	        <tr>
	            <td colspan="2" class="vtop rowform">
	                <ul onmouseover="altStyle(this);">
	                    <li title="{$Think.lang.blacklist.user_no_access_explain}"><input class="radio" type="radio" name="ban_type" value="no_access" /> {$Think.lang.blacklist.user_no_access} </li>
	                    <li class="checked" title="{$Think.lang.blacklist.user_read_only_explain}"><input class="radio" type="radio" name="ban_type" value="read_only" checked="checked" /> {$Think.lang.blacklist.user_read_only} </li>
	                </ul>
	            </td>
	        </tr>
	        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.blacklist.ban_length}:</td></tr>
	        <tr>
	            <td class="vtop rowform"><html:select name="ban_length" options="banLengthOptions" /></td>
	            <td class="vtop tips2"></td>
	        </tr>
	        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.blacklist.ban_reason}:</td></tr>
	        <tr>
	            <td class="vtop rowform"><textarea class="tarea" name="reason" rows="6" cols="50" onkeyup="textareasize(this)"></textarea></td>
	            <td class="vtop tips2"></td>
	        </tr>
	        <tr class="nobg"><td colspan="15"><div class="fixsel"><input type="submit" class="btn" name="bansubmit" value="{$Think.lang.submit}" /></div></td></tr>
	    </form>
    	</tbody>
    	<tbody id="remove-banned-user">
    	<form name="cpform" method="post" action="__URL__/banUser">
		    <input type="hidden" name="op" value="save" />
		    <input type="hidden" name="type" value="remove" />
		    <input type="hidden" name="ban_type" value="exclude" />
            <tr><th class="partition" colspan="2">{$Think.lang.blacklist.remove_banned_user}</th></tr>
			<tr class="nobg"><td colspan="2" class="td27">{$Think.lang.username}:</td></tr>
	        <tr>
	            <td class="vtop rowform">
	            	<select name="id" onchange="showBanReason(this,'reason');">
	            		<option value="0"></option>
		            	<volist name="blacklist" id="vo">
		            	<option value="{$vo.id}"> {$vo.username} ({$vo.email})</option>	
		            	</volist>
	            	</select>
	            </td>
	            <td id="reason" class="vtop tips2" title="{$Think.lang.blacklist.ban_reason}"></td>
	        </tr>
	        <tr class="nobg">
	            <td colspan="15"><div class="fixsel"><input type="submit" class="btn" name="modsubmit" value="{$Think.lang.submit}" /></div></td>
	        </tr>
	    </form>
    	</tbody>
    </table>
</div>

<include file="Public:footer" />